
package com.cse210.grocerwe.server;

import org.restlet.resource.ServerResource;
import com.cse210.grocerwe.common.*;
import com.cse210.grocerwe.client.*;
import javax.jdo.PersistenceManager;
import org.restlet.resource.Put;
import com.google.appengine.api.datastore.KeyFactory;

public class APIResourceI extends ServerResource implements
APIInterfaceI
{
	PersistenceManager pm;
	
    @Put
    public void removeItem(String itemKey)
    {
    	pm = PMF.get().getPersistenceManager();
    	ShoppingItem rm = pm.getObjectById(ShoppingItem.class,KeyFactory.stringToKey(itemKey));
    	pm.deletePersistent(rm);
    	pm.close();
    }
}
